package com.ddwl.order.dao.mapper;

import com.ddwl.common.dao.mapper.TkMapper;
import com.ddwl.order.dao.model.SeckillItem;
import com.ddwl.schema.bo.order.QuerySeckillBo;
import com.ddwl.schema.vo.order.SeckillItemVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * (SeckillItem)数据库交互Mapper
 * @author wenbin
 */
public interface SeckillItemMapper extends TkMapper<SeckillItem> {

    Integer lockSeckillItemQty(@Param("seckillId")String seckillId,@Param("barcode")String barCode,@Param("qty")Integer qty);

    //检测同一活动是否设置了同一个sku
    List<Map> checkSeckillItemQty(@Param("param") QuerySeckillBo param);

    List<SeckillItemVo> querySeckillItem(@Param("param")QuerySeckillBo param);

    Integer releaseSeckillItemQty(@Param("seckillId")String seckillId,@Param("barcode")String barCode,@Param("qty")Integer qty);
}